﻿using Microsoft.AspNetCore.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MQTTnet.AspNetCore;

namespace JESAI.MQTT.Server.Hosts
{
    public static class HostExtensions
    {
        public static IWebHostBuilder CreateMqttServerWebHostBuilder(this IWebHostBuilder webHostBuilder)
        {
            webHostBuilder.UseKestrel(o =>
              {
                  o.ListenAnyIP(61613, m => m.UseMqtt());
              });

            return webHostBuilder;
        }
    }
}
